Optimal. Leaf size=160 \[ -\frac {2 \cos (c+d x)}{b d \sqrt {a+b \sin (c+d x)}}-\frac {4 E\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (c+d x)}}{b^2 d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}+\frac {4 a F\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}{b^2 d \sqrt {a+b \sin (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 160, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {2772, 2831,
2742, 2740, 2734, 2732} \begin {gather*} \frac {4 a \sqrt {\frac {a+b \sin (c+d x)}{a+b}} F\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{b^2 d \sqrt {a+b \sin (c+d x)}}-\frac {4 \sqrt {a+b \sin (c+d x)} E\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{b^2 d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}-\frac {2 \cos (c+d x)}{b d \sqrt {a+b \sin (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2772
Rule 2831
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x)}{(a+b \sin (c+d x))^{3/2}} \, dx &=-\frac {2 \cos (c+d x)}{b d \sqrt {a+b \sin (c+d x)}}-\frac {2 \int \frac {\sin (c+d x)}{\sqrt {a+b \sin (c+d x)}} \, dx}{b}\\ &=-\frac {2 \cos (c+d x)}{b d \sqrt {a+b \sin (c+d x)}}-\frac {2 \int \sqrt {a+b \sin (c+d x)} \, dx}{b^2}+\frac {(2 a) \int \frac {1}{\sqrt {a+b \sin (c+d x)}} \, dx}{b^2}\\ &=-\frac {2 \cos (c+d x)}{b d \sqrt {a+b \sin (c+d x)}}-\frac {\left (2 \sqrt {a+b \sin (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}} \, dx}{b^2 \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}+\frac {\left (2 a \sqrt {\frac {a+b \sin (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}}} \, dx}{b^2 \sqrt {a+b \sin (c+d x)}}\\ &=-\frac {2 \cos (c+d x)}{b d \sqrt {a+b \sin (c+d x)}}-\frac {4 E\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (c+d x)}}{b^2 d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}+\frac {4 a F\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}{b^2 d \sqrt {a+b \sin (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.74, size = 125, normalized size = 0.78 \begin {gather*} \frac {4 (a+b) E\left (\frac {1}{4} (-2 c+\pi -2 d x)|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}-2 \left (b \cos (c+d x)+2 a F\left (\frac {1}{4} (-2 c+\pi -2 d x)|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}\right )}{b^2 d \sqrt {a+b \sin (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(433\) vs.
\(2(216)=432\).
time = 2.30, size = 434, normalized size = 2.71
method | result | size |
default | \(\frac {4 \sqrt {\frac {a +b \sin \left (d x +c \right )}{a -b}}\, \sqrt {-\frac {\left (\sin \left (d x +c \right )-1\right ) b}{a +b}}\, \sqrt {-\frac {\left (1+\sin \left (d x +c \right )\right ) b}{a -b}}\, \EllipticE \left (\sqrt {\frac {a +b \sin \left (d x +c \right )}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a^{2}-4 \sqrt {\frac {a +b \sin \left (d x +c \right )}{a -b}}\, \sqrt {-\frac {\left (\sin \left (d x +c \right )-1\right ) b}{a +b}}\, \sqrt {-\frac {\left (1+\sin \left (d x +c \right )\right ) b}{a -b}}\, \EllipticE \left (\sqrt {\frac {a +b \sin \left (d x +c \right )}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) b^{2}-4 a \sqrt {\frac {a +b \sin \left (d x +c \right )}{a -b}}\, \sqrt {-\frac {\left (\sin \left (d x +c \right )-1\right ) b}{a +b}}\, \sqrt {-\frac {\left (1+\sin \left (d x +c \right )\right ) b}{a -b}}\, \EllipticF \left (\sqrt {\frac {a +b \sin \left (d x +c \right )}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) b +4 \sqrt {\frac {a +b \sin \left (d x +c \right )}{a -b}}\, \sqrt {-\frac {\left (\sin \left (d x +c \right )-1\right ) b}{a +b}}\, \sqrt {-\frac {\left (1+\sin \left (d x +c \right )\right ) b}{a -b}}\, \EllipticF \left (\sqrt {\frac {a +b \sin \left (d x +c \right )}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) b^{2}+2 b^{2} \left (\sin ^{2}\left (d x +c \right )\right )-2 b^{2}}{b^{3} \cos \left (d x +c \right ) \sqrt {a +b \sin \left (d x +c \right )}\, d}\) | \(434\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.13, size = 470, normalized size = 2.94 \begin {gather*} -\frac {2 \, {\left (3 \, \sqrt {b \sin \left (d x + c\right ) + a} b^{2} \cos \left (d x + c\right ) - 2 \, {\left (\sqrt {2} a b \sin \left (d x + c\right ) + \sqrt {2} a^{2}\right )} \sqrt {i \, b} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 i \, a^{3} - 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) - 2 i \, a}{3 \, b}\right ) - 2 \, {\left (\sqrt {2} a b \sin \left (d x + c\right ) + \sqrt {2} a^{2}\right )} \sqrt {-i \, b} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (-8 i \, a^{3} + 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 i \, a}{3 \, b}\right ) + 3 \, {\left (-i \, \sqrt {2} b^{2} \sin \left (d x + c\right ) - i \, \sqrt {2} a b\right )} \sqrt {i \, b} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 i \, a^{3} - 9 i \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 i \, a^{3} - 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) - 2 i \, a}{3 \, b}\right )\right ) + 3 \, {\left (i \, \sqrt {2} b^{2} \sin \left (d x + c\right ) + i \, \sqrt {2} a b\right )} \sqrt {-i \, b} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (-8 i \, a^{3} + 9 i \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (-8 i \, a^{3} + 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 i \, a}{3 \, b}\right )\right )\right )}}{3 \, {\left (b^{4} d \sin \left (d x + c\right ) + a b^{3} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cos ^{2}{\left (c + d x \right )}}{\left (a + b \sin {\left (c + d x \right )}\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^2}{{\left (a+b\,\sin \left (c+d\,x\right )\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________